import React from 'react';
import './index.less';
import PropTypes from 'prop-types';
import CommonHeader from 'COMPONENT/CommonHeader';
import { Button, WhiteSpace } from 'antd-mobile';



class HmdMain extends React.Component { 
    static contextTypes = {
        router: PropTypes.object.isRequired
    }
    constructor(props){ 
        super(props);

        this.state={ 
            hmdData:{
               monthNum:'24个月',
               endDate:'2022-10-10',
               dayRate:'0.037%',
               moeny:'200,000.00',
            },
        }
    }

    componentDidMount(){ 
        //初始化
    }

    //跳转申请页面
    btnClick=()=>{ 
    
        this.context.router.push({
			pathname: '/HmdMain/HmdMainApply'
        })
    }
    //返回
    btnBack=()=>{ 
    
        this.context.router.push({
			pathname: '/HmdMain/HmdMainPreApply'
        })
    }

    render() {
        
        return (
            <div className="hmd_main_pre_apply_con">
           		<CommonHeader 
					name='信用贷款度提取'					
					leftContentTitle="@back" 
					leftContent='返回'
				/>
				<div style={{height:'.9rem'}}></div>
                
                <div className="hmd_apply_top">
                    <div className="hmd_apply_top_title">恭喜您! 签约成功!</div>
                </div>

                <div className="hmd_apply_middle">
                    <div className="hmd_apply_middle_info">
                        <div className="hmd_apply_middle_info_down">
                            <div> 
                                <span>最高贷款金额</span>
                                <span>{this.state.hmdData.moeny}元</span>
                            </div>
                            <div> 
                                <span>最低日利率</span>
                                <span>{this.state.hmdData.dayRate}</span>
                            </div>
                            <div> 
                                <span>额度有效期</span>
                                <span>{this.state.hmdData.endDate}</span>
                            </div>
                            <div> 
                                <span>最长分期期数</span>
                                <span>{this.state.hmdData.monthNum}</span>
                            </div>
                        </div>
                    </div>
                </div>


                {/*<div className="hmd_apply_btn">*/}
                    {/*<Button type="primary" inline className="apply_btn" onClick={this.btnClick}>立即提款</Button>*/}
                    {/*<Button type="primary" inline className="apply_btn" onClick={this.btnBack}>暂不提款</Button>*/}
                {/*</div>*/}
                <WhiteSpace size="lg" /><WhiteSpace size="lg" />
                <div className="btnGroup-two">
                    <Button type="primary" inline className="btnGroup-two-btn"
                            onClick={this.btnClick}>立即提款</Button>
                    <Button type="primary" inline className="btnGroup-two-btn"
                            onClick={this.btnBack}>暂不提款</Button>
                </div>
            </div>
        );
    }
}
export default HmdMain;